home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sources
/
emacs
/
buildu.d
< prev
next >
Wrap
Text File
|
1994-10-02
|
3KB
|
71 lines
#!/bin/sh
# uncomment the next line to see more of the build process
#set -x
# BUILD script provided by Ready-to-Run Software, Inc.
# Copyright 1994 Ready-to-Run Software, Inc. All Rights Reserved.
BUILDDIR=`pwd`
SOURCEDIR=${SOURCEDIR-/cdrom/SOURCES}
if test ! -d $SOURCEDIR ; then
cd `dirname $0`/..; SOURCEDIR=`pwd`
echo Assuming SOURCEDIR is $SOURCEDIR
cd $BUILDDIR
fi
INSTALLDIR=${INSTALLDIR-/usr/local}
INSTALLSHAREDIR=${INSTALLSHAREDIR-/usr/local/share}
if test "$1" != ""; then
MACHINE=$1
fi
if test "$MACHINE" = ""; then
MACHINE=`$SOURCEDIR/../COMMON/GUESS. UPPER`
echo "Assuming machine is $MACHINE"
fi
machine=$MACHINE
echo Ignore any errors about directories already existing
mkdir emacs
mkdir -p $INSTALLDIR
mkdir $INSTALLDIR/bin
mkdir $INSTALLDIR/lib
mkdir -p $INSTALLSHAREDIR
mkdir $INSTALLSHAREDIR/man
mkdir $INSTALLSHAREDIR/man/man1
mkdir $INSTALLSHAREDIR/doc
mkdir $INSTALLSHAREDIR/${SHAREPREFIX}bin
mkdir $INSTALLSHAREDIR/${SHAREPREFIX}lib
/bin/rm -f $BUILDDIR/zcat
/bin/ln -s $SOURCEDIR/../$MACHINE/BIN/ZCAT. $BUILDDIR/zcat
cd $BUILDDIR/emacs
cat $SOURCEDIR/EMACS/EMAC1922.GZ | $BUILDDIR/zcat -d -c | tar xvf -
cd emacs-19.22
(sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/EMACS/RTR/EMACS. | patch -s -p )
test -f $SOURCEDIR/EMACS/$MACHINE/EMACS. &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/EMACS/$MACHINE/EMACS. | patch -b .rtr -s -p )
case ${MACHINE} in
sun4c) configure --with-x-toolkit -prefix=$INSTALLDIR \
--x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib sparc-sun-sunos4
;;
ssol2) configure --with-x-toolkit -prefix=$INSTALLDIR \
--x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib sparc-sun-solaris2
;;
alpha) configure --with-x-toolkit -prefix=$INSTALLDIR \
--with-gcc=no alpha-dec-osf1
;;
sun3) configure -prefix=$INSTALLDIR \
--x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib m68k-sun-sunos4
;;
*) configure --with-x-toolkit -prefix=$INSTALLDIR
esac
make
if test "$RM" != "" ; then make install ; fi
rm $INSTALLDIR/bin/emacs
''ln $INSTALLDIR/bin/emacs-19.22 $INSTALLDIR/bin/emacs
rm $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/19.22/etc/DOC-19.22.1
''ln $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/19.22/etc/DOC $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/19.22/etc/DOC-19.22.1
find $INSTALLDIR/* -name \*.orig -exec rm -f {} \;
if test ${MACHINE} = "rs6000"; then
else
fi
cd ..
cd $BUILDDIR
if test "$RM" != "" ; then rm -rf $BUILDDIR/emacs ; fi